﻿<!--
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.
-->

<basics:ChildWindow x:Class="System.Windows.Controls.Samples.DemoChildWindow"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:basics="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           xmlns:dataform="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.DataForm.Toolkit"
           Width="400" Height="300"
           Title="ChildWindowSample">
    <Grid Margin="2">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <ContentControl HorizontalAlignment="Center" VerticalAlignment="Center" Content="{Binding}" />
        <StackPanel Grid.Row="1" x:Name="optionsStack">
            <Grid HorizontalAlignment="Stretch">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <TextBlock Text="OverlayOpacity: " Margin="4" HorizontalAlignment="Stretch" />
                <Slider Grid.Column="1" Minimum="0" IsEnabled="True" Maximum="1" Value="{Binding OverlayOpacity, Mode=TwoWay}" HorizontalAlignment="Stretch" />
            </Grid>
            <Grid HorizontalAlignment="Stretch">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <TextBlock Text="Overlay Brush: " Margin="4" />
                <ComboBox SelectedItem="{Binding OverlayBrush, Mode=TwoWay}" Grid.Column="1" IsEnabled="True" HorizontalAlignment="Stretch">
                    <ComboBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Margin="2" Text="{Binding Color}" FontFamily="Consolas" VerticalAlignment="Center" />
                                <Rectangle Fill="{Binding}" Margin="2" Stroke="Black" Height="14" Width="75" />
                            </StackPanel>
                        </DataTemplate>
                    </ComboBox.ItemTemplate>
                    <SolidColorBrush Color="White" Opacity=".7"  />
                    <SolidColorBrush Color="Black" Opacity=".7" />
                    <SolidColorBrush Color="Blue" Opacity=".7" />
                    <SolidColorBrush Color="Yellow" Opacity=".7" />
                    <SolidColorBrush Color="Pink" Opacity=".7" />
                    <SolidColorBrush Color="Orange" Opacity=".7" />
                    <SolidColorBrush Color="Green" Opacity=".7" />
                    <SolidColorBrush Color="Red" Opacity=".7" />
                </ComboBox>
            </Grid>
        </StackPanel>
        <Button Content="Cancel" Click="CancelButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,0,0" Grid.Row="2" />
        <Button Content="OK" Click="OKButton_Click" Width="75" Height="23" HorizontalAlignment="Right"  Margin="0,12,79,0" Grid.Row="2" />
    </Grid>
</basics:ChildWindow>